package com.zero.yygh.order.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zero.yygh.model.order.OrderInfo;
import com.zero.yygh.vo.order.OrderCountQueryVo;
import com.zero.yygh.vo.order.OrderQueryVo;

import java.util.Map;

/**
 * @author zero
 * @desc 订单Service
 * @create 2021/5/8
 */
public interface OrderService extends IService<OrderInfo> {

    /**
     * 保存订单
     * @author zero
     * @date 2021/5/8 14:33
     * @param scheduleId 排班ID
     * @param patientId 就诊人ID
     * @return java.lang.Long
     */
    Long saveOrder(String scheduleId, Long patientId);
    /**
     * 分页查询订单信息
     * @author zero
     * @date 2021/5/10 15:18
     * @param pageParam 分页参数
     * @param orderQueryVo 查询条件
     * @return com.baomidou.mybatisplus.core.metadata.IPage<com.zero.yygh.model.order.OrderInfo>
     */
    IPage<OrderInfo> selectPage(Page<OrderInfo> pageParam, OrderQueryVo orderQueryVo);

    /**
     * 获取订单信息
     * @author zero
     * @date 2021/5/10 15:28
     * @param id
     * @return com.zero.yygh.model.order.OrderInfo
     */
    OrderInfo getOrderInfo(Long id);

    /**
     * 订单详情
     * @author zero
     * @date 2021/5/10 16:24
     * @param orderId id
     * @return java.util.Map<java.lang.String,java.lang.Object>
     */
    Map<String,Object> show(Long orderId);

    /**
     * 取消订单
     * @author zero
     * @date 2021/5/12 10:56
     * @param orderId 订单Id
     * @return boolean
     */
    boolean cancelOrder(Long orderId);

    /**
     * 就诊提醒
     * @author zero
     * @date 2021/5/12 14:11
     */
    void patientTips ();

    /**
     * 订单数量
     * @author zero
     * @date 2021/5/12 14:44
     * @param orderCountQueryVo 订单条件查询
     * @return java.util.Map<java.lang.String,java.lang.Object>
     */
    Map<String, Object> getCountMap(OrderCountQueryVo orderCountQueryVo);
}
